<template>
    <div class="text">欢迎使用 {{ this.$project.projectName }}</div>
</template>
<script>
//0
import router from '@/router/router-static';
import * as echarts from 'echarts';

export default {
    data() {
        return {};
    },
    mounted() {
        this.init();
    },
    methods: {
        init() {
            if (this.$storage.get('Token')) {
                this.$http({
                    url: `${this.$storage.get('sessionTable')}/session`,
                    method: 'get',
                }).then(({ data }) => {
                    if (data && data.code !== 0) {
                        router.push({ name: 'login' });
                    }
                });
            } else {
                router.push({ name: 'login' });
            }
        },
    },
};
</script>
<style lang="scss" scoped>
.text {
    font-size: 32px;
    text-align: center;
    font-weight: bold;
}
</style>
